#include<bits/stdc++.h>
using namespace std;
int n;// 1 - 1e5
int r[100005],num[100005],t;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for (int i=1;i<=n;i++){
        scanf("%d",&r[i]);
        num[r[i]]+=1;
    }
    for (int i=1;i<=100000;i++){
        t=min(num[i-1],num[i]);
        num[i]+=num[i-1]-t;
    }
    printf("%d",num[100000]);
    return 0;
}
